home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1995 August: Tool Chest / Dev.CD Aug 95 TC / Dev.CD Aug 95 TC.toast / Tool Chest / Interfaces / UniversalInterfaces 2.1B1 / AIncludes / CommResources.a < prev    next >
Encoding:
Text File  |  1995-04-18  |  5.5 KB  |  240 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CommResources.a
  3. ;
  4. ;    Contains:    Communications Toolbox Resource Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8. ;
  9. ;    Copyright:    © 1984-1995 by Apple Computer, Inc.
  10. ;                All rights reserved.
  11. ;
  12. ;    Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13. ;                stack.  Include the file and version information (from above)
  14. ;                in the problem description and send to:
  15. ;                    Internet:    apple.bugs@applelink.apple.com
  16. ;                    AppleLink:    APPLE.BUGS
  17. ;
  18. ;
  19.  
  20.     IF &TYPE('__COMMRESOURCES__') = 'UNDEFINED' THEN
  21. __COMMRESOURCES__ SET 1
  22.  
  23.  
  24.     IF &TYPE('__OSUTILS__') = 'UNDEFINED' THEN
  25.     include 'OSUtils.a'
  26.     ENDIF
  27. ;        include 'Types.a'                                            ;
  28. ;            include 'ConditionalMacros.a'                            ;
  29. ;        include 'MixedMode.a'                                        ;
  30. ;        include 'Memory.a'                                            ;
  31.  
  32. ;    tool classes (also the tool file types)    
  33. classCM                            EQU        'cbnd'
  34. classFT                            EQU        'fbnd'
  35. classTM                            EQU        'tbnd'
  36.  
  37. ;    version of the Comm Resource Manager    
  38. curCRMVersion                    EQU        2
  39. ; constants general to the use of the Communications Resource Manager 
  40. crmType                            EQU        9                    ; queue type    
  41. crmRecVersion                    EQU        1                    ; version of queue structure 
  42. ;    error codes 
  43. crmGenericError                    EQU        -1
  44. crmNoErr                        EQU        0
  45.  
  46. ; data structures general to the use of the Communications Resource Manager 
  47. ; typedef OSErr             CRMErr
  48. CRMRec                     RECORD    0
  49. qLink                     ds.l   1        ; offset: $0 (0)        ;reserved
  50. qType                     ds.w   1        ; offset: $4 (4)        ;queue type -- ORD(crmType) = 9
  51. crmVersion                 ds.w   1        ; offset: $6 (6)        ;version of queue element data structure
  52. crmPrivate                 ds.l   1        ; offset: $8 (8)        ;reserved
  53. crmReserved                 ds.w   1        ; offset: $C (12)        ;reserved
  54. crmDeviceType             ds.l   1        ; offset: $E (14)        ;type of device, assigned by DTS
  55. crmDeviceID                 ds.l   1        ; offset: $12 (18)        ;device ID; assigned when CRMInstall is called
  56. crmAttributes             ds.l   1        ; offset: $16 (22)        ;pointer to attribute block
  57. crmStatus                 ds.l   1        ; offset: $1A (26)        ;status variable - device specific
  58. crmRefCon                 ds.l   1        ; offset: $1E (30)        ;for device private use
  59. sizeof                     EQU *            ; size:   $22 (34)
  60.                         ENDR
  61.  
  62. ; typedef struct CRMRec     CRMRec
  63. ; typedef CRMRec             *CRMRecPtr
  64. ;
  65. ; pascal CRMErr InitCRM(void)
  66. ;
  67.     IF GENERATINGCFM THEN
  68.         IMPORT_CFM_FUNCTION    InitCRM
  69.     ENDIF
  70.  
  71. ;
  72. ; pascal QHdrPtr CRMGetHeader(void)
  73. ;
  74.     IF GENERATINGCFM THEN
  75.         IMPORT_CFM_FUNCTION    CRMGetHeader
  76.     ENDIF
  77.  
  78. ;
  79. ; pascal void CRMInstall(CRMRecPtr crmReqPtr)
  80. ;
  81.     IF GENERATINGCFM THEN
  82.         IMPORT_CFM_FUNCTION    CRMInstall
  83.     ENDIF
  84.  
  85. ;
  86. ; pascal OSErr CRMRemove(CRMRecPtr crmReqPtr)
  87. ;
  88.     IF GENERATINGCFM THEN
  89.         IMPORT_CFM_FUNCTION    CRMRemove
  90.     ENDIF
  91.  
  92. ;
  93. ; pascal CRMRecPtr CRMSearch(CRMRecPtr crmReqPtr)
  94. ;
  95.     IF GENERATINGCFM THEN
  96.         IMPORT_CFM_FUNCTION    CRMSearch
  97.     ENDIF
  98.  
  99. ;
  100. ; pascal short CRMGetCRMVersion(void)
  101. ;
  102.     IF GENERATINGCFM THEN
  103.         IMPORT_CFM_FUNCTION    CRMGetCRMVersion
  104.     ENDIF
  105.  
  106. ;
  107. ; pascal Handle CRMGetResource(ResType theType, short theID)
  108. ;
  109.     IF GENERATINGCFM THEN
  110.         IMPORT_CFM_FUNCTION    CRMGetResource
  111.     ENDIF
  112.  
  113. ;
  114. ; pascal Handle CRMGet1Resource(ResType theType, short theID)
  115. ;
  116.     IF GENERATINGCFM THEN
  117.         IMPORT_CFM_FUNCTION    CRMGet1Resource
  118.     ENDIF
  119.  
  120. ;
  121. ; pascal Handle CRMGetIndResource(ResType theType, short index)
  122. ;
  123.     IF GENERATINGCFM THEN
  124.         IMPORT_CFM_FUNCTION    CRMGetIndResource
  125.     ENDIF
  126.  
  127. ;
  128. ; pascal Handle CRMGet1IndResource(ResType theType, short index)
  129. ;
  130.     IF GENERATINGCFM THEN
  131.         IMPORT_CFM_FUNCTION    CRMGet1IndResource
  132.     ENDIF
  133.  
  134. ;
  135. ; pascal Handle CRMGetNamedResource(ResType theType, ConstStr255Param name)
  136. ;
  137.     IF GENERATINGCFM THEN
  138.         IMPORT_CFM_FUNCTION    CRMGetNamedResource
  139.     ENDIF
  140.  
  141. ;
  142. ; pascal Handle CRMGet1NamedResource(ResType theType, ConstStr255Param name)
  143. ;
  144.     IF GENERATINGCFM THEN
  145.         IMPORT_CFM_FUNCTION    CRMGet1NamedResource
  146.     ENDIF
  147.  
  148. ;
  149. ; pascal void CRMReleaseResource(Handle theHandle)
  150. ;
  151.     IF GENERATINGCFM THEN
  152.         IMPORT_CFM_FUNCTION    CRMReleaseResource
  153.     ENDIF
  154.  
  155. ;
  156. ; pascal Handle CRMGetToolResource(short procID, ResType theType, short theID)
  157. ;
  158.     IF GENERATINGCFM THEN
  159.         IMPORT_CFM_FUNCTION    CRMGetToolResource
  160.     ENDIF
  161.  
  162. ;
  163. ; pascal Handle CRMGetToolNamedResource(short procID, ResType theType, ConstStr255Param name)
  164. ;
  165.     IF GENERATINGCFM THEN
  166.         IMPORT_CFM_FUNCTION    CRMGetToolNamedResource
  167.     ENDIF
  168.  
  169. ;
  170. ; pascal void CRMReleaseToolResource(short procID, Handle theHandle)
  171. ;
  172.     IF GENERATINGCFM THEN
  173.         IMPORT_CFM_FUNCTION    CRMReleaseToolResource
  174.     ENDIF
  175.  
  176. ;
  177. ; pascal long CRMGetIndex(Handle theHandle)
  178. ;
  179.     IF GENERATINGCFM THEN
  180.         IMPORT_CFM_FUNCTION    CRMGetIndex
  181.     ENDIF
  182.  
  183. ;
  184. ; pascal short CRMLocalToRealID(ResType bundleType, short toolID, ResType theType, short localID)
  185. ;
  186.     IF GENERATINGCFM THEN
  187.         IMPORT_CFM_FUNCTION    CRMLocalToRealID
  188.     ENDIF
  189.  
  190. ;
  191. ; pascal short CRMRealToLocalID(ResType bundleType, short toolID, ResType theType, short realID)
  192. ;
  193.     IF GENERATINGCFM THEN
  194.         IMPORT_CFM_FUNCTION    CRMRealToLocalID
  195.     ENDIF
  196.  
  197. ;
  198. ; pascal OSErr CRMGetIndToolName(OSType bundleType, short index, Str255 toolName)
  199. ;
  200.     IF GENERATINGCFM THEN
  201.         IMPORT_CFM_FUNCTION    CRMGetIndToolName
  202.     ENDIF
  203.  
  204. ;
  205. ; pascal OSErr CRMFindCommunications(short *vRefNum, long *dirID)
  206. ;
  207.     IF GENERATINGCFM THEN
  208.         IMPORT_CFM_FUNCTION    CRMFindCommunications
  209.     ENDIF
  210.  
  211. ;
  212. ; pascal Boolean CRMIsDriverOpen(ConstStr255Param driverName)
  213. ;
  214.     IF GENERATINGCFM THEN
  215.         IMPORT_CFM_FUNCTION    CRMIsDriverOpen
  216.     ENDIF
  217.  
  218. ;
  219. ; pascal CRMErr CRMParseCAPSResource(Handle theHandle, ResType selector, unsigned long *value)
  220. ;
  221.     IF GENERATINGCFM THEN
  222.         IMPORT_CFM_FUNCTION    CRMParseCAPSResource
  223.     ENDIF
  224.  
  225. ;
  226. ; pascal OSErr CRMReserveRF(short refNum)
  227. ;
  228.     IF GENERATINGCFM THEN
  229.         IMPORT_CFM_FUNCTION    CRMReserveRF
  230.     ENDIF
  231.  
  232. ;
  233. ; pascal OSErr CRMReleaseRF(short refNum)
  234. ;
  235.     IF GENERATINGCFM THEN
  236.         IMPORT_CFM_FUNCTION    CRMReleaseRF
  237.     ENDIF
  238.  
  239.     ENDIF ; __COMMRESOURCES__
  240.